from models.tasks import Task
from schemas import ma
from schemas.records import RecordSchema

class TaskSchema(ma.SQLAlchemySchema):
    class Meta:
        model = Task
    id = ma.auto_field()
    name = ma.auto_field()
    description = ma.auto_field()
    publishtime = ma.auto_field()
    accomplishtime = ma.auto_field()
    timeneed = ma.auto_field()
    records = ma.Nested(RecordSchema,many=True)
